﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Web.Framework;
using System.Web.UI;
using System.Configuration;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using Web.Framework.Misc;
using Ubatic.UI;

namespace Ubatic.UI
{
    public abstract class BasePage : BaseWebPage
    {   
        protected UIHelper UIHelper { get; set; }

        protected override void OnPreLoad(EventArgs e)
        {
            
            UIHelper = new UIHelper();
                    
            //base.LoadOperations();          

            base.OnPreLoad(e);            
        }                         

        protected void SetJavascriptForClientClickDirtyChech(LinkButton lnkBtn)
        {
            lnkBtn.OnClientClick = "if(document.DirtyCheck.areControlsDirty()) {return confirm('Hay cambios sin guardar. Desea continuar?'); } else {return true;}";
        }       

        //public List<MaestroBase> GetPaises()
        //{
        //    List<MaestroBase> paisesList = this.Cache["paises"] as List<MaestroBase>;
        //    if (paisesList == null)
        //    {
        //        paisesList = WebServiceHelper.GetPaises();
        //        this.Cache["paises"] = paisesList;
        //    }

        //    return paisesList;
        //}      

    }
}